package com.lagou.service.impl;

import com.lagou.dao.UserDao;
import com.lagou.entity.User;
import com.lagou.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * document
 *
 * @author: dcy
 * @date: 2021-10-08 17:06
 * @version: 1.1
 */
@Service
public class USerServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public List<User> list() {
        return userDao.listUser();
    }

    @Override
    public User insert(User user) {
        userDao.insert(user);
        return user;
    }

    @Override
    public int update(User user) {
        return userDao.update(user);
    }

    @Override
    public int delete(int id) {
        return userDao.delete(id);
    }
}
